<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<%
	xMode = Request("xMode")
	'## ■■ 장비 가져오기 ■■■■
	itemSQL = "SELECT itemCd, itemNm FROM tblComCode WHERE groupCd='0001' AND flag='Y' ORDER BY itemSeq" 

	Set equipRs=Server.CreateObject("ADODB.RecordSet")
	equipRs.open itemSQL, DbCon, 1
	
	equipOption = ""
	If equipRs.eof Or equipRs.bof Then 
	Else 
		Do Until equipRs.eof Or equipRs.bof
		
		equipOption = equipOption & "<option value=""" & equipRs("itemCd") & """>" & equipRs("itemNm") & "</option>" & vbcrlf

		equipRs.movenext
		Loop 
	End If
	'## ■■ Lot No 가져오기 ■■■■
	lotNoSQL = "SELECT TOP 10 lotYear+lotNo fullLotNo FROM tblOrder WHERE flag='Y' ORDER BY  lotYear+lotNo DESC" 

	Set lotNoRs=Server.CreateObject("ADODB.RecordSet")
	lotNoRs.open lotNoSQL, DbCon, 1
	
	lotNoOption = ""
	If lotNoRs.eof Or lotNoRs.bof Then 
	Else 
		Do Until lotNoRs.eof Or lotNoRs.bof
		
		lotNoOption = lotNoOption & "<option value=""" & lotNoRs("fullLotNo") & """>" & lotNoRs("fullLotNo") & "</option>" & vbcrlf

		lotNoRs.movenext
		Loop 
	End If

%>
<!-- #include virtual=/inc/header.inc.asp -->  

<BODY topmargin="0" leftmargin="0">
<!-- #include virtual=/inc/menu.inc.asp -->  

<br>
<!-- 검색 영역 시작 -->
<div style="text-align:left">
<table border="0" cellpadding="0" cellspacing="0" width="1255" style="margin-left:5px;">
	<form name="frmSearch">
	<tr height="40">
		<td style="padding: 0px 0 0px 10px;background-image:url(/inc/layout/panel-title-light-bg.gif);font-weight:bold;text-align:left" width="100%" class="lTD_trbl">
			 기간 <input type="text" name="findStartDt" id="findStartDt" class="inputBox" style="width:80px;" onclick="Calendar_D(document.frmSearch.findStartDt);"> ~ <input type="text" name="findEndDt" id="findEndDt" class="inputBox" style="width:80px;" onclick="Calendar_D(document.frmSearch.findEndDt);"> &nbsp;
			 &nbsp;<select name="findEquipCd" id="findEquipCd"><option value="">-장비-</option><%=equipOption%></select> &nbsp;
			LOT No <input type="text" name="findLotNo" id="findLotNo" class="inputBox" style="width:80px;ime-Mode:active"> &nbsp; 
			<input type="checkbox" id="listMode" name="listMode">합산
			<input type="button" onClick="grid01List()" value="검 색" class="inputBtn">&nbsp;
			<input type="button" onClick="frmSearch.reset()" value="Reset" class="inputBtn">
		</td>
	</tr>
	</form>
</table>
</div>
<!-- 검색 영역 끝 -->


<br>

<!-- 그리드 시작 -->
<div style="text-align:left">
<table border="0" cellpadding="0" cellspacing="0" width="1235" style="margin-left:5px;text-align:left">
	<tr>
		<td width="100%" class="lTD_trbl" valign="top" style="padding: 5px 5px 5px 5px;">
			<table border="0" cellpadding="0" cellspacing="0" width="590">
				<tr height="24">
					<td style="padding: 0 0 0 0;text-align:left" width="300"><div><input type="text" class="subTitle" style="width:100px;" value="장비휴지관리" ReadOnly>&nbsp;<a href="javascript:grid01List()">[새로고침]</a> &nbsp;</div> </td>
					<td style="padding: 0 20 0 0;" align="right" width="290"><B>Total :</B> <span id="grid01Cnt" style="font-weight:bold">0</span></td>
				</tr>
			</table>
			<table border="0" cellpadding="0" cellspacing="0" width="590"><tr><td style="background-color:#3366CC;height:2px"></td></tr></table>
			<form name="frmGrid01">
			<table border="0" width="590" cellpadding="0" cellspacing="0">
				<tr id="Grid01" bgcolor="#EEECE7" height="25" align="center">
					<td width="40" class="lTD_0rbl gridTitle">No.</td>
					<td width="100" class="lTD_0rb0 gridTitle">장비</td>
					<td width="130" class="lTD_0rb0 gridTitle">날짜</td>
					<td width="100" class="lTD_0rb0 gridTitle">휴지시간(분)</td>
					<td width="170" class="lTD_0rb0 gridTitle">LOT No</td>
					<td width="50" class="lTD_0rb0 gridTitle">유효</td>
				</tr>
				<tbody id="tr01Result">
				<tr bgcolor="#FFFFFF" height="30" align="center">
					<td colspan="6" style="color:#948D88; BORDER-TOP: #abccf8 0px solid;height:35px" class="lTD_0rbl">
						검색된 자료가 없습니다.
					</td>
				</tr>
				</tbody>
			</table>
			</form>
			<table border="0" width="590" cellpadding="0" cellspacing="0">
				<tr>
					<td align="left" colspan="6" bgcolor="FFFFFF" style="BORDER-BOTTOM: #abccf8 1px solid;BORDER-LEFT: #abccf8 1px solid;BORDER-TOP: #abccf8 1px solid;BORDER-RIGHT: #abccf8 1px solid;padding-top:0px">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr align="center" height="30">
								<td style="background-image:url(/inc/layout/panel-title-light-bg.gif)"><span id="pageDiv01"></span></td>
							</tr>									
						</table>
					</td>
				</tr>
			</table>
		</td>
		<td valign="top" style="text-align:center; padding-left:5px">					
			<table border="0" cellpadding="0" cellspacing="0" width="500">
				<tr>
				  <td width="100%" class="lTD_trbl" style="padding: 5px 5px 5px 5px; text-align:center">
					<table border="0" cellpadding="0" cellspacing="0" width="490">
						<form name="frmEquip">
						<input type="hidden" name="seq" id="seq">
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold">
								장 &nbsp; &nbsp; &nbsp;비 &nbsp; : &nbsp; <select name="equipCd" id="equipCd" style="width:150px"><option value="">-장비-</option><%=equipOption%></select>
							</td>
						</tr>
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold">
								날 &nbsp; &nbsp; &nbsp;짜 &nbsp; : &nbsp;<input type="text" name="breakDt" id="breakDt" size="12" class="specialBox" style="margin-left:3px" onclick="Calendar_D(document.frmEquip.breakDt);" value="<%=Date()%>"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
								휴지시간 : <input type="text" name="breakTm" id="breakTm" size="3" class="specialBox"> 분
							</td>
						</tr>
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold">
								LOT NO &nbsp; &nbsp;: &nbsp;<select name="fullLotNo" id="fullLotNo" style="width:150px"><option value="">-LotNo-</option><%=lotNoOption%></select>
							</td>
						</tr>
						<tr>
							<td width="490" class="lTD_00b0" style="padding: 10px 0 10px 20px; text-align:left; font-weight:bold">
								<textarea name="remark" id="remark" class="inputBox" style="width:450px; height:150px"></textarea>

							</td>
						</tr>
						<tr>
							<td height="30" width="490" class="lTD_00b0" style="padding: 0 0 0 20px; text-align:left; font-weight:bold">
								<select name="flag" id="flag">
									<option value="Y">유효</option>
									<option value="N">삭제</option>
								</select> &nbsp; &nbsp;<input type="text" id="accessInfo" style="font-weight:normal;width:250px; border:0px">
								<span>
								<input type="button" value="저장" class="inputBtn" onClick="fnSave()"> 
								<input type="button" value="신규" class="inputBtn" onClick="frmEquip.reset();">
								</span>
							</td>
						</tr>
						</form>
					</table>
				  </td>
				</tr>
			</table>
		</td>		
		<td width="265">
			<table border="0" cellpadding="0" cellspacing="0" width="147">
				<tr>
					<td>&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</div>
<!-- 그리그 끝 -->

<script language="javascript">
	setMainMenu();
//	//## 테스트를 위한 기본 값세팅	
//	$("#company").val("아이탱크");
//	$("#owner").val("James");
//	$("#phone").val("02-538-5966");
//	$("#fax").val("02-569-2365");
//	$("#major").val("Jade");
//	$("#cellPhone").val("020-5623-5656");
//	$("#compNo").val("02-232-223369");
//	$("#memo").val("연습입니다. ㅋ");
//	$("#flag").val("Y");
////	$("#compCd").val("4");
</script>
</BODY>
</HTML>